package com.hspedu.poly_.polyparameter;

/**
 * @Author Stringzhua
 * @Date 2024/3/2 20:23
 * description:
 */
public class Manager extends Employee {
    private double bonus;

    //管理方法manage
    public void manage() {
        System.out.println("经理" + getName() + "正在管理");
    }
    //重写获取年薪的方法


    @Override
    public double getAnnual() {
        return super.getAnnual() + bonus;
    }

    public Manager(String name, double monsalary, double bonus) {
        super(name, monsalary);
        this.bonus = bonus;
    }

    public double getBonus() {
        return bonus;
    }

    public void setBonus(double bonus) {
        this.bonus = bonus;
    }
}
